import request from '@/utils/request'

export function list(query) {
  return request({
    url: '/rule/getList',
    method: 'get',
    params: query
  })
}

export function create(data) {
  return request({
    url: '/rule/create',
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: '/rule/editRule',
    method: 'post',
    data
  })
}

export function remove(data) {
  return request({
    url: '/rule/deleted',
    method: 'get',
    params: data
  })
}

export function isStatus(data) {
  return request({
    url: '/rule/update',
    method: 'get',
    params: data
  })
}

export function ruleList(query) { // 规则名称下拉框数据
  return request({
    url: '/rule/getRuleList',
    method: 'get',
    params: query
  })
}
